﻿using System.Text;

namespace com.fukefu.sql
{
    public class SqlString
    {
        StringBuilder sb = new StringBuilder();
        bool end = true;
        public SqlString()
        {
            sb.Append("begin transaction;\r\n");
        }
        public void Add(string sql)
        {
            sb.Append(sql + ";\r\n");
        }
        public string Read()
        {
            if (end)
            {
                sb.Append("commit transaction;\r\n");
                end = false;
            }
            return sb.ToString();
        }
    }
}
